﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;
using DBUtility;

namespace BLL.DutyAssignment
{
    public class B_Duty
    {
        private readonly OracleDAL.DutyAssignment.D_Duty dal = new OracleDAL.DutyAssignment.D_Duty();
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        ///  更新一条数据
        /// </summary>
        public bool Update(Model.DutyAssignment.M_Duty model)
        {
            return dal.Update(model);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model.DutyAssignment.M_Duty GetModel(string ID)
        {
            return dal.GetModel(ID);
        }

        /// <summary>
        /// 得到一个对象实体(需要加where关键字)
        /// </summary>
        public Model.DutyAssignment.M_Duty GetModelByWhere(string strWhere)
        {
            return dal.GetModelByWhere(strWhere);
        }

        /// <summary>
        /// 轮班设置的预览table
        /// </summary>
        /// <param name="dutyid"></param>
        /// <returns></returns>
        public DataTable GetShiftView(string dutyid)
        {
            return dal.GetShiftView(dutyid);
        }
    }
}
